package com.zhijian.medical.dao.local;

import com.zhijian.medical.entity.po.ExperimentProcessSpecimen;
import com.zhijian.medical.entity.vo.request.ExperimentProcessSpecimenSearchVo;
import com.zhijian.medical.entity.vo.response.ExperimentProcessSpecimenVo;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;

public interface ExperimentProcessSpecimenMapper {
    int deleteByPrimaryKey(Long id);

    /**
     * 根据实验流程id进行删除
     *
     * @param experimentProcessId
     * @return
     */
    int deleteByExperimentProcessId(Long experimentProcessId);

    /**
     * 根据实验流程id与设备id进行删除
     *
     * @param experimentProcessId
     * @param deviceId
     * @return
     */
    int deleteByExperimentProcessIdAndDeviceId(@Param("experimentProcessId") Long experimentProcessId, @Param("deviceId") Long deviceId);

    int insert(ExperimentProcessSpecimen record);

    int insertSelective(ExperimentProcessSpecimen record);

    void insertBySelective(@Param("param") Map<String, List<String>> param);

    ExperimentProcessSpecimen selectByPrimaryKey(Long id);

    int updateByPrimaryKeySelective(ExperimentProcessSpecimen record);

    int updateByPrimaryKey(ExperimentProcessSpecimen record);

    int count(ExperimentProcessSpecimenSearchVo experimentProcessSpecimenSearchVo);

    List<ExperimentProcessSpecimenVo> selectList(ExperimentProcessSpecimenSearchVo experimentProcessSpecimenSearchVo);

    ExperimentProcessSpecimenVo selectVoById(Long id);

    /**
     * 根据实验流程id进行查找
     *
     * @param experimentProcessId
     * @return
     */
    ExperimentProcessSpecimenVo selectVoByExperimentProcessId(Long experimentProcessId);

    /**
     * 根据实验流程id与扩增仪id进行查找
     *
     * @param experimentProcessId
     * @param deviceId
     * @return
     */
    ExperimentProcessSpecimenVo selectVoByExperimentProcessIdAndDeviceId(@Param("experimentProcessId") Long experimentProcessId, @Param("deviceId") Long deviceId);
}